package com.htj.common;

import com.htj.exception.SysException;
import com.htj.exception.TokenException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class BaseHandler {
    //处理token异常
    @ExceptionHandler(TokenException.class)
    public Result handler(TokenException e){
        return  Result.build(null,ResultCodeEnum.TOKEN_ERROR);
    }
}
